import { Row } from 'antd';
import * as React from 'react';
import OperatorItem, { OperatorItemType } from './OperatorItem';

interface OperatorGroupProps {
  style?: object;
  settings: OperatorItemType[];
}

export default function OperatorGroup(props: OperatorGroupProps) {
  const { style, settings } = props;

  return (
    <Row style={style}>
      {settings.map((setting, index) => (
        <OperatorItem setting={setting} length={settings.length} key={index} />
      ))}
    </Row>
  );
}
